# @file    : run_test
# @time    : 2025/3/25
# @author  : yongpeng.yao
# @desc    :
import dashscope

thread_id = 'thread_71d5bb80-09f5-4a6c-a4f8-6a77d1074276'
assistant_id = 'asst_4d40b28d-3305-4b83-b982-6da0952f0af1'
stream_iterator = dashscope.Runs.create(thread_id,
                                        assistant_id=assistant_id,
                                        stream=True,
                                        instructions='请回答问题')
for event, msg in stream_iterator:
    print(event)
    print(msg)
